import socialExpandRow from './socialInquiry/table-expand.vue'
import accumulationFundExpandRow from './accumulationFundInquiry/table-expand.vue'

// 社保年度普调
export const socialInquiryThead = [
  {
    type: 'selection',
    width: 60,
    align: 'center'
  },
  {
    title: '参保编号',
    key: 'securityNO'
  },
  {
    title: '生效时间',
    key: 'effectTime',
    render: (h, params) => {
      const text = params.row.effectTime ? params.row.effectTime.substr(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '创建人',
    key: 'createdName'
  },
  {
    title: '创建时间',
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? params.row.createdOn.substr(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '操作',
    width: 140,
    align: 'center',
    key: 'action',
    slot: 'action'
  },
  {
    title: '展开',
    type: 'expand',
    key: 'expand',
    fixed: 'right',
    width: 70,
    render: (h, params) => {
      return h(socialExpandRow, {
        props: {
          row: params.row
        }
      })
    }
  }
]

// 社保年度普调-展开
export const socialInquiryChildrenThead = [
  {
    title: '养老保险',
    key: 'Pension',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'PensionCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'PensionCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'PensionEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'PensionEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '医疗保险',
    key: 'MedicalCare',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'MedicalCareCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'MedicalCareCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'MedicalCareEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'MedicalCareEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '失业保险',
    key: 'Unemployment',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'UnemploymentCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'UnemploymentCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'UnemploymentEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'UnemploymentEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '工伤保险',
    key: 'InjuryOnTheJob',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'InjuryOnTheJobCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'InjuryOnTheJobCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'InjuryOnTheJobEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'InjuryOnTheJobEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '生育保险',
    key: 'Birth',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'BirthCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'BirthCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'BirthEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'BirthEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '大病医疗',
    key: 'SeriousIllness',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'SeriousIllnessCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'SeriousIllnessCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'SeriousIllnessEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'SeriousIllnessEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '残保金',
    key: 'DisabledPersonsSecurityFund',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'DisabledPersonsSecurityFundCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'DisabledPersonsSecurityFundCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'DisabledPersonsSecurityFundEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'DisabledPersonsSecurityFundEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '门诊医疗',
    key: 'OutpatientDepartment',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'OutpatientDepartmentCompanyminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'OutpatientDepartmentCompanymaxAmount',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 200,
        align: 'center',
        children: [
          {
            title: '最低基数',
            key: 'OutpatientDepartmentEmployeeminAmount',
            width: 100
          },
          {
            title: '最高基数',
            key: 'OutpatientDepartmentEmployeemaxAmount',
            width: 100
          }
        ]
      }
    ]
  }
]

// 公积金年度普调
export const accumulationFundInquiryThead = [
  {
    type: 'selection',
    width: 60,
    align: 'center'
  },
  {
    title: '参保编号',
    key: 'securityNO'
  },
  {
    title: '生效时间',
    key: 'effectTime',
    render: (h, params) => {
      const text = params.row.effectTime ? params.row.effectTime.substr(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '创建人',
    key: 'createdName'
  },
  {
    title: '创建时间',
    key: 'createdOn',
    render: (h, params) => {
      const text = params.row.createdOn ? params.row.createdOn.substr(0, 10) : ''
      return h('span', text)
    }
  },
  {
    title: '操作',
    width: 120,
    align: 'center',
    key: 'action',
    slot: 'action'
  },
  {
    title: '展开',
    type: 'expand',
    key: 'expand',
    fixed: 'right',
    width: 70,
    render: (h, params) => {
      return h(accumulationFundExpandRow, {
        props: {
          row: params.row
        }
      })
    }
  }
]

// 公积金年度普调明细
export const accumulationFundInquiryChildrenThead = [
  {
    title: '单位',
    key: 'company',
    align: 'center',
    children: [
      {
        title: '最低基数',
        key: 'ProvidentFundCompanyminAmount'
      },
      {
        title: '最高基数',
        key: 'ProvidentFundCompanymaxAmount'
      }
    ]
  },
  {
    title: '个人',
    key: 'employee',
    align: 'center',
    children: [
      {
        title: '最低基数',
        key: 'ProvidentFundEmployeeminAmount'
      },
      {
        title: '最高基数',
        key: 'ProvidentFundEmployeemaxAmount'
      }
    ]
  }
]
